<template>
  <div class="detailtop">
    <img :src="this.path" alt="">
    <div class="mask" ref="mask"></div>
  </div>
</template>

<script>
export default {
  name: 'DetailTop',
  data () {
    return {}
  },
  props: {
    path: {
      type: String,
      default: '',
      required: true
    }
  },
  methods: {
    changeMask (opacity) {
      this.$refs.mask.style.opacity = opacity
    }
  }
}
</script>

<style scoped lang='scss'>
  .detailtop{
    width: 100%;
    height: 500px;
    overflow: hidden;
    img{
      width: 100%;
      height: 500px;
    }
    .mask{
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      opacity: 0;
      background: #000;
    }
  }
</style>
